create or replace function generate_out_order_log()
    returns void as
$$
declare
item    integer;
begin
for item in (select 1)
loop
    insert into t_stock values(item::integer,item::integer,item::integer);
end loop;
end;
$$ language plpgsql;
-- 函数执行
select generate_out_order_log();

DROP FUNCTION generate_out_order_log();

insert into t_stock
values(10000,500,100);

alter table t_stock
	add prize varchar not null;


